#ifndef BODY_H
#define BODY_H

#include <Box2D/Box2D.h>
#include "Common/Common.h"
#include "TextureInfo.h"
#include "ReusableBodyDef.h"

class Body
{
public:
	Body( b2World* world, const b2BodyType type, const cmn::Transform& pos, const cmn::Transform& vel, const ReusableBodyDef* reusableBodyDef, const TextureInfo* texInfo );
	virtual ~Body();

	inline void SetTextureInfo( const TextureInfo* texInfo ) { m_texInfo = texInfo; }
	inline const TextureInfo* GetTextureInfo() const { return m_texInfo; }

	inline b2Body* GetBody() const { return m_body; }

	void Draw() const;

private:
	b2World* m_world;
	b2Body* m_body;
	const TextureInfo* m_texInfo;
};

#endif
